<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
-->
</style>
<link href="<%=basePath%>/admin/images/skin.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath%>/admin/css/riqi.css" rel="stylesheet" type="text/css" />
<script src="<%=basePath%>/admin/js/riqi1.js" type="text/javascript"></script>
<body>
   <%
     if(session.getAttribute("msg")!=null)
     {
       %>
        <script type="text/javascript">
         alert('<%=session.getAttribute("msg")%>');  
        </script>
       <%
       session.removeAttribute("msg");
     }
     %>
   <script src="<%=basePath%>/admin/js/riqi.js" type="text/javascript"></script>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="17" height="29" valign="top"
					background="<%=basePath%>/admin/images/mail_leftbg.gif">
					<img src="<%=basePath%>/admin/images/left-top-right.gif" width="17" height="29" />
				</td>
				<td width="935" height="29" valign="top"
					background="<%=basePath%>/admin/images/content-bg.gif">
					<table width="100%" height="31" border="0" cellpadding="0"
						cellspacing="0" class="left_topbg" id="table2">
						<tr>
							<td height="31">
								<div class="titlebt">
									友情链接管理
								</div>
							</td>
						</tr>
					</table>
				</td>
				<td width="16" valign="top"
					background="<%=basePath%>/admin/images/mail_rightbg.gif">
					<img src="<%=basePath%>/admin/images/nav-right-bg.gif" width="16" height="29" />
				</td>
			</tr>
			<tr>
				<td height="71" valign="middle"
					background="<%=basePath%>/admin/images/mail_leftbg.gif">
					&nbsp;
				</td>
				<td valign="top" bgcolor="#F7F8F9">
					<table width="100%" height="138" border="0" cellpadding="0"
						cellspacing="0">
						
						<tr>
							<td valign="top">
								<table width="98%" border="0" align="center" cellpadding="0"
									cellspacing="0">
									<tr>
										<td class="left_txt">
											当前位置：友情链接管理
										</td>
									</tr>
									<tr>
										<td height="20">
											<table width="100%" height="1" border="0" cellpadding="0"
												cellspacing="0" bgcolor="#CCCCCC">
												<tr>
													<td></td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="55" border="0" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="10%" height="55" valign="middle">
														<img src="<%=basePath%>/admin/images/title.gif" width="54" height="55">
													</td>
													<td width="90%" valign="top">
														<span class="left_txt2">在这里，您可以根据您的网站要求，修改设置网站的</span><span
															class="left_txt3">会员信息录入</span><span class="left_txt2">！</span>
														<br>
														<span class="left_txt2">包括</span><span class="left_txt3">网站名称，网址，网站备案号，联系方式，网站公告，关键词，风格</span><span
															class="left_txt2">等以及网站</span><span class="left_txt3">会员及等级积分设置</span><span
															class="left_txt2">。 </span>
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="31" border="0" cellpadding="0"
												cellspacing="0" class="nowtable">
												<tr>
													<td class="left_bt2">
														&nbsp;&nbsp;&nbsp;&nbsp;友情链接管理
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0" style="border: 1px solid #2F4D67; ">
                                              <tr>
                                               <td colspan="7">
                                                <form action="links!addLinks.action" method="post" enctype="multipart/form-data">
                                                 <ul>
                                                  <li>链接名称：&nbsp;<input type="text" name="link.lname" size="25"/>(如：百度一下)</li>
                                                  <li>链接类型：&nbsp;
                                                   <select name="link.ltype">
                                                    <option value="01">友情链接</option>
                                                    <option value="02">广告图片</option>
                                                   </select>
                                                  </li>
                                                  <li>链接地址：&nbsp;<input type="text" name="link.linkurl" value="http://www.ncjzw.net" size="25"/>(如：http://www.baidu.com)</li>
                                                  <li>链接图标：&nbsp;<input type="file" size="25" name="myFile"/>(250*80)</li>
                                                  <li>链接描述：&nbsp;<input type="text" size="30" name="link.ltips"/></li>
                                                 </ul>
                                                 <input type="submit" value="友情链接添加"/>
                                                </form>
                                               </td>
                                              </tr>
                                              <tr bgcolor="#CFD7E1">
                                               <td align="center">链接编号</td>
                                               <td align="center">链接类型</td>
                                               <td align="center">链接名称</td>
                                               <td align="center">链接地址</td>
                                               <td align="center">链接LOGO</td>
                                               <td align="center">链接描述</td>
                                               <td align="center">删除</td>
                                              </tr>
                                              <c:if test="${!empty pm.datas}"> 
												<c:forEach items="${pm.datas}" var="links">
													<tr bgcolor="#EFF3F7">
														<td align="center">
															${links.lid }
														</td>
														<td align="center">
															<c:if test="${'01' eq links.ltype }">
															 <font color="red">友情链接</font>
															</c:if>
															<c:if test="${'02' eq links.ltype }">
															 <font color="blue">广告图片</font>
															</c:if>
														</td>
														<td align="center">
															${links.lname }&nbsp;
														</td>
														<td align="center">
															${links.linkurl }&nbsp;
														</td>
														<td align="center">
															<img src="<%=basePath%>${links.logo}" height="40" width="80"/>
														</td>
														<td align="center">
															${links.ltips }&nbsp;
														</td>
														<td align="center">
															<a href="links!delLinksByLid.action?link.lid=${links.lid  }">删除</a>
														</td>
														
													</tr>
												</c:forEach>
											</c:if>
											<c:if test="${empty pm.datas}">
												<tr>
													<td colspan="6" align="center" bgcolor="#EFF3F7">
														没有找到相应的记录
													</td>
												</tr>
											</c:if>
											    <tr>
											     <td colspan="6" align="right">
											     【<a href="school!findAllSchoolToExcel.action">数据导出</a>】
											     <pg:pager url="links!findAllLinksByLimit.action" items="${pm.total}"
											export="currentPageNumber=pageNumber" maxPageItems="5"
											maxIndexPages="5">
											<pg:first>
												<a href="${pageUrl}">首页</a>
											</pg:first>  
                                             [第${currentPageNumber}页]/[共${pm.total}条记录]
                                            <pg:prev>
												<a href="${pageUrl }">上一页</a>
											</pg:prev>
											<pg:pages>
												<c:choose>
													<c:when test="${currentPageNumber eq pageNumber}">
														<font color="red">${pageNumber }</font>
													</c:when>
													<c:otherwise>
														<a href="${pageUrl }">${pageNumber }</a>
													</c:otherwise>
												</c:choose>
											</pg:pages>
											<pg:next>
												<a href="${pageUrl }">下一页</a>
											</pg:next>
											<pg:last>
												<a href="${pageUrl }">尾页</a>
											</pg:last>
										</pg:pager>
											    </td>
											    </tr>  		
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
				<td background="<%=basePath%>/admin/images/mail_rightbg.gif">
					&nbsp;
				</td>
			</tr>
			<tr>
				<td valign="middle" background="<%=basePath%>/admin/images/mail_leftbg.gif">
					<img src="<%=basePath%>/admin/images/buttom_left2.gif" width="17" height="17" />
				</td>
				<td height="17" valign="top"
					background="<%=basePath%>/admin/images/buttom_bgs.gif">
					<img src="<%=basePath%>/admin/images/buttom_bgs.gif" width="17" height="17" />
				</td>
				<td background="<%=basePath%>/admin/images/mail_rightbg.gif">
					<img src="<%=basePath%>/admin/images/buttom_right2.gif" width="16" height="17" />
				</td>
			</tr>
		</table>
</body>
